//
//  HWMainTableViewCell.m
//  JWC
//
//  Created by lanou on 16/4/8.
//  Copyright © 2016年 陈帅. All rights reserved.
//

#import "HWMainTableViewCell.h"
#import "UIImageView+WebCache.h"

@interface HWMainTableViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *icon;
@property (weak, nonatomic) IBOutlet UILabel *name;
@property (weak, nonatomic) IBOutlet UILabel *count;
@property (weak, nonatomic) IBOutlet UIButton *attention;


@end

@implementation HWMainTableViewCell

- (void)setMainWithModel:(HWMainModel *)model
{
    if (model.is_vip)
    {
        self.name.textColor = [UIColor redColor];
    }
    self.icon.layer.cornerRadius = 21;
    self.icon.clipsToBounds = YES;  // 修剪超出视图部分
    [self.icon sd_setImageWithURL:[NSURL URLWithString:model.header] placeholderImage:[UIImage imageNamed:@"defaultUserIcon"]];
    self.name.text = model.screen_name;
    self.count.text = model.fans_count;
}

// 关注按钮
- (IBAction)likeBtn:(UIButton *)sender
{
    [sender setTitle:@"已关注" forState:UIControlStateNormal];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
